package com.forestar.mapControl.utils.mapConvert.geometry;

import com.forestar.mapControl.utils.mapConvert.geometry.utils.GeometryUtils;
import com.mapzone.api.geometry.mzConverter;
import com.mapzone.api.geometry.mzGeometry;

/**
 * Created by YSJ on 2017/5/26.
 */

public class GeoConverter
  {
       public static mzConverter m_mzConverter = new mzConverter();

       //二进制转几何
       public static IGeometry Blob2Geom(byte[] pBlob)
         {
             mzGeometry m_mzGeo = m_mzConverter.Blob2mzGeom(pBlob);
             return  GeometryUtils.mzGeometry2IGeometry(m_mzGeo);
         }

       //几何转二进制
       public static byte[] Geom2Blob(mzGeometry geo)
         {
                //采用默认的版本
               return  m_mzConverter.mzGeom2Blob(geo,mzGeometry.mzUnknownVersions);
         }
  }
